"""DgPysite URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/2.2/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""

from django.urls import path
from MallApp import views
from django.conf import settings
from django.conf.urls import url, include
from django.views.generic.base import TemplateView
from django.conf.urls.static import static

urlpatterns = [
                  url(r'index$', views.IndexView.as_view(), name="index"),  # 主页
                  url(r'^pay_money$', views.PayMoneyView.as_view(), name="pay_money"),  # 充值
                  url(r'^pay_success$', views.PaySuccessView.as_view(), name="pay_success"),  # 充值成功
                  url(r'^upload_data$', views.UploadDataView.as_view(), name="upload_data"),  # 上传数据
                  url(r'^get_datatype$', views.DataTypeView.as_view(), name="get_datatype"),  # 获取资源类型
                  url(r'^my_data$', views.MyDataView.as_view(), name="my_data"),  # 我的数据
                  url(r'^data_detail$', views.DataDetailView.as_view(), name="data_detail"),  # 数据详情
                  url(r'^download_data$', views.DownLoadDataView.as_view(), name="download_data"),  # 下载数据
                  url(r'^my_download_data$', views.MyDownLoadDataView.as_view(), name="my_download_data"),  # 我下载的数据
              ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
